package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author
 * @Date 2024/5/16 18:49
 * @Description:
 */
@Mapper
public interface OrderMapper extends BaseMapper<Orders> {

    @Select("select sum(amount) from orders where order_time between #{begin} and #{end} and status = 5")
    Integer TurnReport(LocalDateTime begin, LocalDateTime end);
}
